package com.joysuch.wwyt.bp.controller;

import com.joysuch.wwyt.bp.bean.BpExamAssessListBean;
import com.joysuch.wwyt.bp.entity.BpExamStatistics;
import com.joysuch.wwyt.bp.service.BpExamStatisticsService;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 考核评审管理——考核评审统计
 *
 * @author JamesZY
 * @date 2021/4/27
 */
@Slf4j
@RestController
@Api(tags = "核评审管理—考核评审统计")
@RequestMapping("/wwyt/bp-exam-statistics")
public class BpExamStatisticsController {
    @Autowired
    private BpExamStatisticsService bpExamStatisticsService;

    @RequestMapping("list")
    public Object list() {
        try {
            List<BpExamStatistics> data = bpExamStatisticsService.findAll();
            return ResultBean.success(data);
        } catch (Exception e) {
            log.error("查询失败", e);
            return ResultBean.fail(101, "查询失败");
        }
    }
}
